<template>
  <div>
    <div class="chart" ref="chart"></div>
  </div>
</template>

<script>
export default {
  name:'com-chart',
  data(){
    return{
      chart:null,
    }
  },
  mounted(){
    this.chart = this.$echarts.init(this.$refs.chart)
  },
  methods:{
    init(option){
      this.chart.setOption(option)
    },
  }
}
</script>

<style lang="scss" scoped>
.chart{
  width:100%;
  height:100%;
}
</style>